package org.fing.edu.uy.esbadp.core.entity;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;

import org.fing.edu.uy.esbadp.core.constants.ConfigConstants;

@XmlRootElement(name = ConfigConstants.STRATEGIES_ROOT_ELEMENT)
@XmlSeeAlso({DMAdpStrategy.class})
public class DMAdpStrategies implements Serializable {
	
	private static final long serialVersionUID = -4650567229866326585L;
	
	List<DMAdpStrategy> strategies;
	
	public DMAdpStrategies(){
		this.strategies = new LinkedList<DMAdpStrategy>();		
	}

	@XmlElementRef
	public List<DMAdpStrategy> getStrategies() {
		return strategies;
	}

	public void setStrategies(List<DMAdpStrategy> strategies) {
		this.strategies = strategies;
	}

	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("Adaptation Strategies ->\n");
		for(DMAdpStrategy aux : strategies){
			sb.append(aux.toString());
			sb.append("\n");
		}
		return sb.toString();
	}
	
}

